package com.artpri.service;

import java.util.List;

import com.artpri.model.GoodsOrder;
import com.artpri.model.OrderInfo;
import com.artpri.model.vo.OrderInfoVo;

/**
 * 订单 -service 
 * @author ZhangSi
 */
public interface OrderInfoService {
	
	public enum OrderType{
		ALL,WAIT_PAY,WAIT_GOODS,WAIT_COMMENT,DONE_DEAL,CANCELED,
		UNFINISH;
	}

	boolean addOrder(OrderInfo order, List<GoodsOrder> goodsOrders, int addId);

	void cancelOrder(Integer id, String cancelReason);

	List<OrderInfo> listOrderByPage(Integer userNum,  OrderType type, int pageNo, int pageSize);
	
	List<OrderInfoVo> listOrderVo(Integer userNum, String type);

	List<OrderInfoVo> listOrderVoByPage(Integer userNum, String type, int pageNo, int pageSize);

	List<OrderInfoVo> listOrderVo(Integer userNum, OrderType type);

	List<OrderInfoVo> listOrderVoByPage(Integer userNum, OrderType type, int pageNo, int pageSize);

	List<Integer> countOrder(Integer userNum);
	
	Integer getOrderCount(Integer userNum, String orderType);
	
	Integer getOrderCount(Integer usrNum, OrderType type);

}
